import java.util.Scanner;

public class 成绩 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int sum = 0;
        for (int i = 0; i >= 0; i++) {
            System.out.println("请输入成绩：");
            double score = in.nextDouble();
            if (score == -1) {
                System.out.println("程序结束");
                break;

            }
            else {
                sum += score;
            }
            System.out.println("总分：" + sum);
        }
    }}

